var map = new AMap.Map("container", {
    resizeEnable: true, //是否监控地图容器尺寸变化
    zoom: 13, //初始地图级别
    pitch: 50,
    viewMode: '2D',
    center: [118.462865,35.546372],////初始地图中心点
    showIndoorMap: false //关闭室内地图
});
//为地图注册click事件获取鼠标点击出的经纬度坐标
map.on('click', function(e) {
    $("#longitude").val(e.lnglat.getLng());
    $("#latitude").val(e.lnglat.getLat());
});
var auto = new AMap.Autocomplete({
    input: "tipinput"
});
AMap.event.addListener(auto, "select", select);//注册监听，当选中某条记录时会触发
function select(e) {
    if (e.poi && e.poi.location) {
        map.setZoom(15);
        map.setCenter(e.poi.location);
    }
}
